//Setting_begin
var Page_View_Label='Lần';
//Setting_end
var Page_View_Selector = '.bi-page-view';
var Page_View_Holder = [];
var Page_View_Url = [];
var Page_View_Index = 0;
document.write('<div class="bipageview-achor-hook" style="display:none"></div>');
$('.bipageview-achor-hook').parents('.widget').remove();
function Bi_Pnp_View_Valid_Domain(url)
{
    
    key = '.blogspot.';
    index = url.indexOf(key);
    
    if (index != -1)
    {
        url1 = url.substring(0, index+key.length);
        url2 = url.substring(index+key.length);
        
        
        key = '/';
        index = url2.indexOf(key);
        
        if (index != -1)
        {
            url3 = url2.substring(index);
            url = url1 + 'com' + url3;

        }
    }
    return url;
}

function Bi_Pnp_View_Nake_Url(url)
{
    
    remove = ['http://', 'https://', 'www.'];
    for (i = 0; i < remove.length; i++)
    {
        index = url.indexOf(remove[i]);
        if (index != -1)
        {
            url = url.substring(0, index) + url.substring(index + remove[i].length);
        }
    }
    
    key = '?';
    index = url.indexOf(key);
    if (index != -1)
    {
        url = url.substring(0,index);
    }
    
    key = '#';
    index = url.indexOf(key);
    if (index != -1)
    {
        url = url.substring(0,index);
    }
    
    url = Bi_Pnp_View_Valid_Domain(url);
    
    return escape(url);
}



function Bi_Pnp_View_Server_Request(idx)
{    
    var bi_pnp_view_xmlhttp;
    
    if (window.XMLHttpRequest)
    {
        
        bi_pnp_view_xmlhttp=new XMLHttpRequest();
    }
    else
    {
        
        bi_pnp_view_xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    } 
    bi_pnp_view_xmlhttp.onreadystatechange=function(){
        if (bi_pnp_view_xmlhttp.readyState==4 && bi_pnp_view_xmlhttp.status==200){           
            $(Page_View_Holder[idx]).html(bi_pnp_view_xmlhttp.responseText);
        }
    }
    
   var _0x9b2b=["\x30\x2E\x37\x28\x27\x38\x27\x2C\x27\x39\x3A\x2F\x2F\x36\x2E\x34\x2F\x31\x2F\x32\x2D\x35\x2D\x33\x2F\x61\x2D\x62\x2D\x68\x2E\x69\x3F\x6A\x3D\x27\x2B\x67\x5B\x66\x5D\x2B\x27\x26\x63\x3D\x27\x2B\x64\x2C\x65\x29\x3B\x30\x2E\x6B\x28\x29\x3B","\x7C","\x73\x70\x6C\x69\x74","\x62\x69\x5F\x70\x6E\x70\x5F\x76\x69\x65\x77\x5F\x78\x6D\x6C\x68\x74\x74\x70\x7C\x77\x69\x64\x67\x65\x74\x7C\x70\x61\x67\x65\x7C\x63\x6F\x75\x6E\x74\x65\x72\x7C\x63\x6F\x6D\x7C\x76\x69\x65\x77\x7C\x62\x6C\x6F\x67\x67\x65\x72\x69\x74\x65\x6D\x73\x7C\x6F\x70\x65\x6E\x7C\x47\x45\x54\x7C\x68\x74\x74\x70\x7C\x62\x69\x7C\x70\x6E\x70\x7C\x6C\x62\x7C\x50\x61\x67\x65\x5F\x56\x69\x65\x77\x5F\x4C\x61\x62\x65\x6C\x7C\x74\x72\x75\x65\x7C\x69\x64\x78\x7C\x50\x61\x67\x65\x5F\x56\x69\x65\x77\x5F\x55\x72\x6C\x7C\x76\x69\x65\x77\x73\x7C\x70\x68\x70\x7C\x75\x72\x6C\x7C\x73\x65\x6E\x64","\x72\x65\x70\x6C\x61\x63\x65","","\x5C\x77\x2B","\x5C\x62","\x67"];eval(function (_0x1591x1,_0x1591x2,_0x1591x3,_0x1591x4,_0x1591x5,_0x1591x6){_0x1591x5=function (_0x1591x3){return _0x1591x3.toString(36);} ;if(!_0x9b2b[5][_0x9b2b[4]](/^/,String)){while(_0x1591x3--){_0x1591x6[_0x1591x3.toString(_0x1591x2)]=_0x1591x4[_0x1591x3]||_0x1591x3.toString(_0x1591x2);} ;_0x1591x4=[function (_0x1591x5){return _0x1591x6[_0x1591x5];} ];_0x1591x5=function (){return _0x9b2b[6];} ;_0x1591x3=1;} ;while(_0x1591x3--){if(_0x1591x4[_0x1591x3]){_0x1591x1=_0x1591x1[_0x9b2b[4]]( new RegExp(_0x9b2b[7]+_0x1591x5(_0x1591x3)+_0x9b2b[7],_0x9b2b[8]),_0x1591x4[_0x1591x3]);} ;} ;return _0x1591x1;} (_0x9b2b[0],21,21,_0x9b2b[3][_0x9b2b[2]](_0x9b2b[1]),0,{}));
    
}


    
$(document).ready(function(){    
    $(Page_View_Selector).each(function(){
        Page_View_Holder[Page_View_Index] = this;
        Page_View_Url[Page_View_Index] = $(this).attr('url');
        Page_View_Url[Page_View_Index] = Bi_Pnp_View_Nake_Url(Page_View_Url[Page_View_Index]);        
        
        Bi_Pnp_View_Server_Request(Page_View_Index);
        Page_View_Index++;                                
    });
        
    
});